﻿using System.ComponentModel;
using CPETwit.WPFClient.Business;
using CPETwit.WPFClient.Business.TwitterServiceReference;
using System.Windows.Media;
using CPETwit.WPFClient.Helper;

namespace CPETwit.WPFClient.CustomObject
{
    public class CustomUser
    {
        private readonly User _user;
        
        public CustomUser(User user)
        {
            _user = user;
        }

        public string UserName
        {
            get { return _user.name; }
        }
        public string LastName
        {
            get { return _user.name; }
        }
        public ImageSource ImageSource
        {
            get
            {
                return _user.avatar == null ? 
                    ImageLoader.GetDefaultImageSource() : 
                    ImageLoader.GetImageSourceFromBytes(_user.avatar);
            }
        }
    }
}
